﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="list.aspx.vb" Inherits="stocks.stocks" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource1" DataKeyNames="ID" BackColor="White" 
            BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
            ForeColor="Black" GridLines="Horizontal">
        <Columns>
            <asp:ImageField DataAlternateTextField="Logo" DataImageUrlField="Logo">
                <ControlStyle CssClass="companyLogo" />
            </asp:ImageField>
            <asp:BoundField DataField="CompanyName" HeaderText="Company" 
                SortExpression="CompanyName" />
            <asp:HyperLinkField DataNavigateUrlFields="Ticker" 
                DataNavigateUrlFormatString="https://www.google.co.uk/finance?q={0}" 
                DataTextField="Ticker" HeaderText="Ticker" />
            <asp:BoundField DataField="Industry" HeaderText="Industry" 
                SortExpression="Industry" />
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="detail.aspx?ID={0}" HeaderText="Thesis" 
                Text="Read thesis" />
        </Columns>
        <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
        <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F7F7F7" />
        <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
        <SortedDescendingCellStyle BackColor="#E5E5E5" />
        <SortedDescendingHeaderStyle BackColor="#242121" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:StocksConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:StocksConnectionString.ProviderName %>" 
        
            SelectCommand="SELECT [CompanyName], [Industry], [Ticker], [Logo], [ID] FROM [Stocks]">
    </asp:SqlDataSource>
</p>
<p>
</p>
<p>
</p>
<p>
    &nbsp;</p>
<p>
</p>
</asp:Content>
